#!/bin/sh

VERSION="1.0"
CFG="/home/jls/ezremaster/core17wifi.cfg"
ISO="/mnt/sda1/boot/iso/core17wifi-$VERSION.iso"

if [ ! -f /usr/local/tce.installed/ezremaster ]; then
   if [ ! -e /etc/sysconfig/tcedir/optional/ezremaster.tcz ]; then
      tce-load -w ezremaster
   fi
      tce-load -is ezremaster
fi
sudo rm -rf ezremaster/*
#echo -n "Press Enter key."
#read gagme
remaster.sh $CFG checkimage
remaster.sh $CFG extractimage
#remaster.sh $1 bootcode
sudo cp coreplus/isolinux.cfg ezremaster/image/boot/isolinux
sudo cp coreplus/f1 ezremaster/image/boot/isolinux
sudo cp copy2fs.lst ezremaster/image/cde
#echo -n "Press Enter key."
#read gagme
remaster.sh $CFG apps
remaster.sh $CFG package
mv ezremaster/ezremaster.iso "$ISO"
